<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>找回{$sitename}密码</title>
{include file="header"/}
</head>
<body>
<!-- // sign-header end -->
	<div class="layout" id="sign-content">
		<div class="ui-box ui-qire sign-focus" id="psw-box">
		<div class="logo"><a href="{$siteurl}" title="{$sitename}"></a></div>
			<div class="ui-title fn-clear">
			   <span>已有{$sitename}帐号？请<a href="{:zanpian_user_url('user/login/index')}">点击登录</a></span>
				<h2>取回密码</h2>
			</div>
			<div class="ui-cnt fn-clear">
				<form id="getpswform" method="post" onsubmit="return false;">
					<div class="ui-form sign-primary">
						<div class="ui-form-item fn-clear">
							<label for="email" class="ui-label w130">您的<strong>Email</strong>地址：</label>
                            <input type="text" id="email" name="email" class="ui-input w220" value=""><p class="onShow ui-message" id="emailTip">请输入邮箱</p>
						</div>
						<div class="ui-form-item fn-clear" id="validate-code">
							<label for="validate" class="ui-label w130">验证码：</label>
							 <div class="ui-form-block w120">
								<input type="text" id="validate" name="validate" maxlength="10" class="ui-input w110" value=""><p class="validate-code-btn">看不清? <a href="javascript:void()" id="verimgbut">换一张</a>
									</p>
							</div>
							<img src="{:zp_url('user/validate/verify','',false,false)}" id="verimg" alt="点击图片更换验证码"title="点击图片更换验证码"><p class="onShow ui-message" id="validateTip">输入上图字母</p>
						</div>
						<div class="ui-form-item fn-clear">
							<label class="ui-label w130">&nbsp;</label>
							<input type="hidden" name="dosubmit" id="dosubmit" value="1">
							<input type="submit" id="loginbt" class="ui-button w220" value="找回密码">
						</div>
					</div>
				</form>
				<!-- // ui-form End -->
                
			</div>
		</div>
		<!-- // sign-box#pswbox end -->
		<script type="text/javascript">
			$.formValidator.initConfig({
				formID : "getpswform",
				debug : false,
				submitOnce : false,
				onSuccess : function() {
					$("#getpswform").qiresub({
						curobj : $("#loginbt"),
						txt : '数据提交中,请稍后...',
						onsucc : function(result) {
							$.hidediv(result);
						}
					}).post({
						url : "{:zanpian_user_url('user/login/forgetpwd')}"
					});
					return false;
				},
				onError : function(msg, obj, errorlist) {
					$("#errorlist").empty();
					$.map(errorlist, function(msg) {
						$("#errorlist").append("<li>" + msg + "</li>")
					});
				},
				submitAfterAjaxPrompt : '有数据正在异步验证，请稍等...'
			});
$("#email")
		.formValidator({
			onShow : "请输入真实正确的邮箱地址",
			onFocus : "邮箱必须填写真实正确邮箱，要激活才能登陆！",
			onCorrect : "填写正确",
			defaultValue : ""
		})
		.inputValidator({
			min : 6,
			max : 100,
			onError : "你输入的邮箱长度非法,请确认"
		})
		.regexValidator({
		   regExp : "^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",
		   onError : "你输入的邮箱格式不正确"
		}).ajaxValidator({
	      dataType : "json",
	      async : true,
	      cache : false,
	      url : "{:zp_url('user/validate/index','',false,false)}-email-",
	      success : function(data) {
		  if (parseInt(data.status) > 0) {
			return false;
		} else {
			return true;
		}
	},
	onError : "邮箱不存在",
	onWait : "正在对验证码不正确，请稍候..."
});
		$("#validate").formValidator({
	    onShow : "输入上图字母",
	    onFocus : "输入上图字母",
	    onCorrect : "验证码正确"
       }).inputValidator({
	      min : 4,
	      max : 4,
	      onError : "验证码错误"
       }).regexValidator({
	      regExp : "^[A-Za-z0-9]+$",
	      onError : "你输入的格式不正确"
       }).ajaxValidator({
	      dataType : "json",
	      async : true,
	      cache : false,
	      url : "{:zp_url('user/validate/index','',false,false)}-imgcode-",
	      success : function(data) {
		  if (parseInt(data.status) > 0) {
			return true;
		} else {
			return false;
		}
	},
	onError : "验证码不正确",
	onWait : "正在对验证码不正确，请稍候..."
});

			$("#verimgbut,#verimg").click(function(){
				$("#verimg").attr('src',"{:zp_url('user/validate/verify','',false,false)}-" + Math.random());

			});

		</script>
{include file="footer"/}
<!-- // footer end -->
</div>
<!-- // sign-content end -->
</body>
</html>